package com.yx.fx.sys.web.model.save;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import java.util.List;

/**
 * @author 杨智杰
 * @since 2021/8/25 8:49
 */
@Data
@Accessors(chain = true)
@ApiModel("添加用户数据模型")
public class SaveUser {

    @NotBlank
    @Length(max = 32)
    @ApiModelProperty(value = "用户名", required = true)
    private String userName;

    @NotBlank
    @Length(max = 32)
    @ApiModelProperty(value = "登录账号", required = true)
    private String loginName;

    @NotBlank
    @Length(min = 32, max = 32)
    @ApiModelProperty(value = "登陆密码", required = true)
    private String password;

    @Length(max = 32)
    @ApiModelProperty(value = "手机号")
    private String phone;

    @Email
    @Length(max = 64)
    @ApiModelProperty(value = "邮箱")
    private String email;

    @Length(max = 128)
    @ApiModelProperty(value = "头像")
    private String photo;

    @ApiModelProperty(value = "当前状态(0禁用，1启用)")
    private Integer status = 0;

    @ApiModelProperty(value = "用户角色列表")
    private List<Long> roleList;

    @ApiModelProperty(value = "用户部门列表")
    private List<Long> deptList;
}
